
import audioManager from "./AudioManager";

const {ccclass, property} = cc._decorator;

@ccclass
export default class Dialog extends cc.Component {


    @property({
        type: cc.Node,
        displayName: '关闭按钮'
    })
    close: cc.Node;


    protected audioManager

    start() {
        this.audioManager = audioManager
        this.close.on(cc.Node.EventType.TOUCH_START, this.onClose, this)
    }

    onClose(isClose = true) {
        this.node.active = !isClose
        this.audioManager.playBtnClickAudio()
    }

    // update (dt) {}
}
